package com.example.vbloodbanksalesforce.adapter;

import java.util.ArrayList;

import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.example.vbloodbanksalesforce.R;
import com.example.vbloodbanksalesforce.bean.BloodDetail;

public class AreaAdapter {/*extends BaseAdapter{
	ViewHolder s ;
	Context context;
	ArrayList<BloodDetail> _arealist;
	public AreaAdapter(Context _context,ArrayList<BloodDetail> arealist) {
		// TODO Auto-generated constructor stub
		_arealist = arealist;
		context = _context;
	}
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return _arealist.size();
	}
	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return 0;
	}
	public class ViewHolder{
		TextView tv;
	}
	
	@Override
	public View getView(int position, View v, ViewGroup arg2) {
		// TODO Auto-generated method stub
		if(v == null){
			LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
			v = inflater.inflate(R.layout.display, null);
			s = new ViewHolder();
			s.tv = (TextView) v.findViewById(R.id.tv);
			v.setTag(s);
		}else {
			s = (ViewHolder) v.getTag();
		}
		final BloodDetail bean = _arealist.get(position);
		String area = bean.getArea().toString();
		Log.i("NCS", "Final tv data is"+area);
		s.tv.setText(area);
		return v;
	}
	*/
}